import { createRouter, createWebHashHistory } from 'vue-router'
import Index from '@/views/index.vue'
import Team from '@/views/Team/index.vue'
import addTeam from '@/views/Team/addTeam.vue'
import updateTeam from '@/views/Team/updateTeam.vue'
import Mine from '@/views/Mine/index.vue'
import Search from '@/views/Search/index.vue'
import Edit from '@/views/Mine/edit.vue'
import SearchResult from '@/views/Search/searchResult.vue'
import Login from '@/views/login.vue'
import UserInfo from '@/views/User/userInfo.vue'
import teamCreate  from '@/views/User/Team/create.vue'
import teamJoin  from '@/views/User/Team/join.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Index,
    },
    {
      path: '/team',
      name: 'team',
      component: Team,
    },
    {
      path: '/team/addTeam',
      name: 'addTeam',
      component: addTeam,
    },
    {
      path: '/team/updateTeam',
      name: 'updateTeam',
      component: updateTeam,
    },
    {
      path: '/mine',
      name: 'mine',
      component: Mine,
    },
    {
      path: '/User/userInfo',
      name: 'userInfo',
      component: UserInfo,
    },
    {
      path: '/User/Team/join',
      name: 'userJoin',
      component: teamJoin,
    },
    {
      path: '/User/Team/create',
      name: 'userCreate',
      component: teamCreate,
    },
    {
      path: '/search',
      name: 'search',
      component: Search,
    },
    {
      path: '/searchResult',
      name: 'searchResult',
      component: SearchResult,
    },
    {
      path: '/mine/edit',
      name: 'editUser',
      component: Edit,
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
    },
  ],
})

export default router
